<template>
  <view class="container">
    <view class="item" @click="goaboutour">
      <view style="font-weight: 500; font-size: 28rpx; color: #000000">关于我们</view>
      <uni-icons type="right" size="20"></uni-icons>
    </view>
    <view class="item" @click="gouserxieyi">
      <view style="font-weight: 500; font-size: 28rpx; color: #000000">用户协议</view>
      <uni-icons type="right" size="20"></uni-icons>
    </view>
    <view class="item" @click="goprivacy">
      <view style="font-weight: 500; font-size: 28rpx; color: #000000">隐私政策</view>
      <uni-icons type="right" size="20"></uni-icons>
    </view>
    <view class="logout" @click="$refs.popup.open()">退出登陆</view>
    <uni-popup ref="popup" type="center">
      <view class="box">
        <view style="font-weight: bold; font-size: 30rpx; color: #222222; margin: 0rpx 0 70rpx 140rpx">确认退出该账号？</view>
        <view style="display: flex; align-items: center">
          <view style="width: 260rpx; height: 98rpx; text-align: center; line-height: 98rpx; border-top: 1px solid #ccc; border-right: 1px solid #ccc" @click="$refs.popup.close()">
            取消
          </view>
          <view style="width: 260rpx; height: 98rpx; text-align: center; line-height: 98rpx; border-top: 1px solid #ccc" @click="logoutfn">确定</view>
        </view>
      </view>
    </uni-popup>
  </view>
</template>

<script>
export default {
  data() {
    return {};
  },
  methods: {
    // 退出
    logoutfn() {
      this.$refs.popup.close();
      uni.clearStorage();
      uni.reLaunch({
        url: '/pages/login/login'
      });
    },
    goaboutour() {
      uni.navigateTo({
        url: '/mine/aboutour/aboutour'
      });
    },
    goprivacy() {
      uni.navigateTo({
        url: '/mine/privacy/privacy'
      });
    },
    gouserxieyi() {
      uni.navigateTo({
        url: '/mine/userxieyi/userxieyi'
      });
    }
  }
};
</script>

<style lang="scss" scoped>
.container {
  box-sizing: border-box;
  .item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 30rpx 26rpx;
    border-bottom: 1px solid #e7e7e7;
  }
  .logout {
    width: 654rpx;
    height: 92rpx;
    text-align: center;
    line-height: 92rpx;
    font-weight: 500;
    font-size: 30rpx;
    color: #3483f6;
    margin: 270rpx 48rpx;
    border-radius: 20rpx 20rpx 20rpx 20rpx;
    border: 2rpx solid #3483f6;
  }
  .box {
    box-sizing: border-box;
    width: 520rpx;
    height: 274rpx;
    background: #ffffff;
    border-radius: 20rpx 20rpx 20rpx 20rpx;
    padding-top: 64rpx;
  }
}
</style>
